/**
 * @file lv_battery_demo.c
 *
 */

/*********************
 *      INCLUDES
 *********************/
#include "lvgl.h"
#include "lv_battery.h"

/*********************
 *      DEFINES
 *********************/


/**********************
 *      TYPEDEFS
 **********************/

/**********************
 *  STATIC PROTOTYPES
 **********************/


/**********************
 *  STATIC VARIABLES
 **********************/


/**********************
 *      MACROS
 **********************/

/**********************
 *   GLOBAL FUNCTIONS
 **********************/

void lv_battery_demo(void)
{
    lv_obj_t * top = lv_obj_create(lv_screen_active());
    lv_obj_set_size(top, LV_PCT(100), 150);
    lv_obj_set_align(top, LV_ALIGN_CENTER);
    lv_obj_set_style_bg_color(top, lv_color_hex(0x333333), 0);
    
    lv_obj_t * battery = lv_battery_create(top);
    lv_battery_set_cfg(battery, NULL);
    lv_obj_align(battery, LV_ALIGN_TOP_LEFT, 8, 8);
    lv_battery_update_percent(battery, 50);

    /*battery = lv_battery_create(top);
    lv_obj_align(battery, LV_ALIGN_TOP_RIGHT, 8, 8);
    lv_battery_set_dir(battery, LV_BATTERY_DIR_RIGHT);
    lv_battery_update_percent(battery, 50);*/
}
